/*
 * endpoint.h
 *
 *  Created on: 2010-10-23
 *      Author: tan
 */

#ifndef ENDPOINT_H_
#define ENDPOINT_H_

#include "epoll.h"

namespace light {

namespace network {

class Session {

};

template<class AcceptHandler>
class Endpoint {
public:
	Endpoint();
	virtual ~Endpoint();

public:
	void start() throw(NetworkException);
	void accept(AcceptHandler handler) throw(NetworkException);
	void recv() throw(NetworkException);

private:
	Epoll epoll;
};

}

}


#endif /* ENDPOINT_H_ */
